/*
 * Copyright (c) 2018 maoyan.com
 * All rights reserved.
 *
 */
package com.darren.euc.entity;

import java.io.Serializable;

/**
 * 在这里编写类的功能描述
 *
 * @author fangwenhao
 * @created 2018/3/17
 */
public class DeptVO implements Serializable{

    private Integer id;

    private Integer parentId = 0 ;

    private String deptName;

    private String code;

    private Integer status = 0;

    private Integer clientId;

    private String clientName;

    private Integer count;

    public DeptVO(){}

    public DeptVO(Dept dept) {
        this.id = dept.getId();
        this.parentId = dept.getParentId();
        this.deptName = dept.getDeptName();
        this.code = dept.getCode();
        this.status = dept.getStatus();
        this.clientId = dept.getClientId();
    }

    public Dept toDept(){
        Dept dept = new Dept();
        if(id!=null && id>0)dept.setId(id);
        if(parentId!=null && parentId>0){dept.setParentId(parentId);}else{
            dept.setParentId(0);
        }
        dept.setDeptName(deptName);
        dept.setCode(code);
        dept.setStatus(status);
        dept.setClientId(clientId);
        return dept;
    }


    public String getClientName() {
        return clientName;
    }

    public void setClientName(String clientName) {
        this.clientName = clientName;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getClientId() {
        return clientId;
    }

    public void setClientId(Integer clientId) {
        this.clientId = clientId;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }



}
